using System;
using System.ComponentModel;

namespace TeamReview.Services
{
    internal class BindingItemCodeReview
    {
        private readonly string title;
        public readonly int Id;

        public BindingItemCodeReview(string text, int id)
        {
            title = text;
            Id = id;
        }

        private string Caption
        {
            get 
            {
                return String.Format("{0} - {1}", Id, title);
            }
        }

        public override string ToString()
        {
            return Caption;
        }
    }

    public class QueryBindingItem : IDataErrorInfo
    {
        private event PropertyChangedEventHandler PropertyChanged;

        public QueryBindingItem()
        {

        }
        public int Id { get; set; }
        public string Name { get; set; }
        public string Error
        {
            get { return null; }
        }

        public string this[string columnName]
        {
            get
            {
                string sResult = string.Empty;
                return sResult;
            }
        }
        protected void NotifyPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

       
    }
}